home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / Toolbars.pxl < prev    next >
Text File  |  2001-09-14  |  26KB  |  817 lines

  1. Initialize:
  2.     AppWindowHandle(Handle,Handle$, geoPiXCLFlag,Major,Minor)
  3.     Title$ = "Standard, View, History and Custom Toolbars in PiXCL"
  4.     UseCaption(Title$)
  5.     UseCoordinates(PIXEL)
  6.     SetColorPalette(BITMAP)
  7.     UseBackground(TRANSPARENT,166,166,166)
  8.     DrawBackground
  9.     WinLocate(Title$,150,100,760,520,Res)
  10.     WinShow(Title$,NOTOPMOST,Res)
  11.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  12.     DirGet(SourceDir$)
  13.     ImageDir$ = SourceDir$
  14.  
  15.     InfoMenu(REMOVE)
  16.     WaitInput(100)
  17.     SetMenu("&File",IGNORE,
  18.         "E&xit!",Leave,
  19.         ENDPOPUP,
  20.         "&Toolbar Commands",IGNORE,
  21.         "Std Small Tool Bar",Make_SSmall_Toolbar,
  22.         "Std Large Tool Bar",Make_SLarge_Toolbar,
  23.         "View Small Tool Bar",Make_VSmall_Toolbar,
  24.         "View Large Tool Bar",Make_VLarge_Toolbar,
  25.         "History Small Tool Bar",Make_HSmall_Toolbar,
  26.         "History Large Tool Bar",Make_HLarge_Toolbar,
  27.         SEPARATOR,
  28.         "Mixed Small Tool Bar",Make_MSmall_Toolbar,
  29.         "Mixed Large Tool Bar",Make_MLarge_Toolbar,
  30.         SEPARATOR,
  31.         "PiXCL Small Tool Bar", Make_SPiXCL_Toolbar,
  32.         "PiXCL Large Tool Bar", Make_LPiXCL_Toolbar,
  33.         SEPARATOR,
  34.         "Status Changes",BtnStatus,
  35.         "Remove Tool Bar",Remove_Toolbar,
  36.         SEPARATOR,
  37.         "Change Toolbar",Change_Toolbar,
  38.         "Change ToolWindow",Change_ToolWindow,
  39.         ENDPOPUP,
  40.  
  41.         "Toolwindow Commands",IGNORE,
  42.         "&Make Tool Windows",Make_Tool_Windows,
  43.         "&Remove Tool Windows",Remove_Tool_Windows,
  44.         SEPARATOR,
  45.         "Status Changes",TWBtnStatus,
  46.         "Disable Test",TWBtnStatus2,
  47.         ENDPOPUP,
  48.  
  49.         "Mouse Reporting",IGNORE,
  50.         "Report Mouse Info",MouseInfo,
  51.         "Report Mouse+RGB Info",MouseInfoRGB,
  52.         "Mouse Info End",MouseInfoEnd,
  53.         ENDPOPUP)
  54.  
  55.     SetShftRightMouse(cx1,cy1,cx2,cy2,DrawBkg,X,Y)
  56.     SetRightMouse(cx1,cy1,cx2,cy2,Test1,X,Y)
  57.     Font$ = "Arial"
  58.  
  59.     GoSub Concept
  60.  
  61.     
  62. Wait_for_Input: 
  63.     GoSub MakeTimeString
  64.     WaitInput(10000) {update the status bar time display every 10 seconds}
  65.     Goto Wait_for_Input
  66.  
  67. Change_Toolbar:
  68.     CustomizeToolBtn("")
  69.     Goto Wait_for_Input
  70.  
  71. Change_ToolWindow:
  72.     CustomizeToolBtn("History")
  73.     Goto Wait_for_Input
  74.  
  75.  
  76. Remove_Tool_Windows:
  77.     ToolWindow()
  78.     Goto Wait_for_Input
  79.  
  80. Make_Tool_Windows:    
  81.     ToolWindow( 10, 50,118,324,POPUP,"PiXCL 4.4",
  82.         RAISED,     
  83.         PXL_LARGE,    
  84.         ANNOT,  ENABLED, STD, "Annotation", Test_TW11,    
  85.         SQSELECT,  ENABLED, STD, "Select", Test_TW12,
  86.         POLYSELECT,  ENABLED, STD, "PolySelect", Test_TW13,
  87.         ERASE,  ENABLED, STD, "Erase", Test_TW14,
  88.         OPENIMAGE,  ENABLED, STD, "Open Image", Test_TW15,
  89.         HISTOGRAM,  ENABLED, STD, "Histogram", Test_TW16,
  90.         MIRROR,  ENABLED, STD, "Image Mirror", Test_TW17,
  91.         FLIP,  ENABLED, STD, "Image Flip", Test_TW18,
  92.         ROTATE,  ENABLED, STD, "Image Rotate", Test_TW19,
  93.         SHOWRGB,  ENABLED, STD, "Show RGB", Test_TW110,
  94.         PICKRGB,  ENABLED, STD, "Pick RGB", Test_TW111,
  95.         CLASSIFY,  ENABLED, STD, "Fast Classify", Test_TW112, 
  96.         NORMALIZE,  ENABLED, STD, "Normalize Image", Test_TB1,
  97.         EQUALIZE,  ENABLED, STD, "Equalize Image", Test_TB1,
  98.         NEGATIVE,  ENABLED, STD, "Negative Image", Test_TB1,
  99.         GAMMACRCT,  ENABLED, STD, "Gamma Correct", Test_TB1,
  100.         IMAGEINFO,  ENABLED, STD, "ImageInfo", Test_TB1,
  101.         FINGER,  ENABLED, STD, "Finger", Test_TB1,
  102.         HAND,  ENABLED, STD, "Hand", Test_TB1,
  103.         FLOOD,  ENABLED, STD, "Flood", Test_TB1,
  104.         SPRAY,  ENABLED, STD, "Spray", Test_TB1,
  105.         ZOOMUP,  ENABLED, STD, "Positive Zoom", Test_TB1,
  106.         ZOOMDN,  ENABLED, STD, "Negative Zoom", Test_TB1,
  107.         BRUSH,  ENABLED, STD, "Brush", Test_TB1, 
  108.         
  109.         280,160,447,226,POPUP,"P History",
  110.         RAISED,   
  111.         PXL_LARGE,    
  112.         PXL_BACK,  ENABLED, STD, "Back", Test_TW21,
  113.         PXL_FORWARD,  ENABLED, STD, "Forward", Test_TW22,
  114.         PXL_FAVORITES,  ENABLED, STD, "Favorites", Test_TW23,
  115.         PXL_ADDTOFAVORITES,  ENABLED, STD, "Add to Favorites", Test_TW24,
  116.         PXL_VIEWTREE,  ENABLED, STD, "View Tree", Test_TW25 ,
  117.  
  118.         300,440,402,542,POPUP,"View Btns #1",
  119.         RAISED,     
  120.         PXL_SMALL,      
  121.         PXL_LGICONS,  ENABLED, STD, "View Large Icons", Test_TB13,
  122.         PXL_SMICONS,  ENABLED, STD, "View Small Icons", Test_TB14,
  123.         PXL_PARENTFOLDER,  ENABLED, STD, "Parent Folder", Test_TB15,
  124.         PXL_NEWFOLDER,  ENABLED, STD, "New Folder", Test_TB16,
  125.         PXL_LIST,  ENABLED, STD, "View List", Test_TB13,
  126.         PXL_DETAILS,  ENABLED, STD, "View Details", Test_TB13,
  127.         PXL_SORTBYNM,  ENABLED, STD, "Sort by Name", Test_TB13,
  128.         PXL_SORTBYSZ,  ENABLED, STD, "Sort by Size", Test_TB13,
  129.         PXL_SORTBYDT,  ENABLED, STD, "Sort by Date", Test_TB13,
  130.         PXL_SORTBYTYP,  ENABLED, STD, "Sort by Type", Test_TB13,
  131.         PXL_NETCNCT,  ENABLED, STD, "Network Connect", Test_TB13,
  132.         PXL_NETDSCNCT,  ENABLED, STD, "Network DisConnect", Test_TB13,
  133.  
  134.  
  135.         400,440,502,542,POPUP,"View Btns #2",
  136.         FLAT,     
  137.         VIEW_SMALL,      
  138.         LGICONS,  ENABLED, STD, "View Large Icons", Test_TB13,
  139.         SMICONS,  ENABLED, STD, "View Small Icons", Test_TB14,
  140.         PARENTFOLDER,  ENABLED, STD, "Parent Folder", Test_TB15,
  141.         NEWFOLDER,  ENABLED, STD, "New Folder", Test_TB16,
  142.         LIST,  ENABLED, STD, "View List", Test_TB13,
  143.         DETAILS,  ENABLED, STD, "View Details", Test_TB13,
  144.         SORTBYNM,  ENABLED, STD, "Sort by Name", Test_TB13,
  145.         SORTBYSZ,  ENABLED, STD, "Sort by Size", Test_TB13,
  146.         SORTBYDT,  ENABLED, STD, "Sort by Date", Test_TB13,
  147.         SORTBYTYP,  ENABLED, STD, "Sort by Type", Test_TB13,
  148.         NETCNCT,  ENABLED, STD, "Network Connect", Test_TB13,
  149.         NETDSCNCT,  ENABLED, STD, "Network DisConnect", Test_TB13)
  150.  
  151.     Goto Wait_for_Input
  152.  
  153. Make_SSmall_Toolbar:
  154.     UseBackground(TRANSPARENT, 0,128,0)
  155.     DrawBackground
  156.  
  157.     Toolbar(RAISED,
  158.         STD_SMALL,
  159.         NULL, NULL, SEPARATOR, "", Test_TB,
  160.  
  161.         NEW, ENABLED, STD, "FileNew", Test_TB1,
  162.         OPEN, ENABLED, STD, "FileOpen", Test_TB2,
  163.         SAVE, ENABLED, STD, "FileSave", Test_TB3,
  164.  
  165.         NULL, NULL, SEPARATOR, "", Test_TB,
  166.         NULL, NULL, SEPARATOR, "", Test_TB,
  167.  
  168.         CUT,  ENABLED, CHECK_G, "Edit: Cut", Test_TB4, 
  169.         COPY ,  ENABLED, CHECK_G, "Edit: Copy", Test_TB5,
  170.         PASTE,  ENABLED, CHECK_G, "Edit: Paste", Test_TB6, 
  171.         DELETE,  ENABLED, CHECK_G, "Edit: Delete", Test_TB7, 
  172.         REPLACE, ENABLED,CHECK_G,"Edit: Replace",Test_TB8,
  173.         REDO,  ENABLED, STD, "Redo", Test_TB9, 
  174.         UNDO,  ENABLED, STD, "Undo", Test_TB9, 
  175.         PRINT,  ENABLED, STD, "Print", Test_TB10, 
  176.  
  177.         NULL, NULL, SEPARATOR, "", Test_TB,
  178.  
  179.         FIND,  ENABLED, STD, "Find", Test_TB8, 
  180.         PROP, ENABLED, STD,"Properties", Test_TB8,
  181.         PPREV,  ENABLED, STD, "Print Preview", Test_TB11, 
  182.         SHOHLP,  ENABLED, STD, "Show Help", Test_TB12) 
  183.  
  184.     Goto Wait_for_Input
  185.  
  186. Make_SLarge_Toolbar:
  187.     UseBackground(TRANSPARENT, 0,128,0)
  188.     DrawBackground
  189.  
  190.     Toolbar(    RAISED,
  191.     PXL_LARGE,
  192.         NULL, NULL, SEPARATOR, "", Test_TB,
  193.  
  194.         PXL_NEW, ENABLED, STD, "FileNew", Test_TB1,
  195.         PXL_OPEN, ENABLED, STD, "FileOpen", Test_TB2,
  196.         PXL_SAVE, ENABLED, STD, "FileSave", Test_TB3,
  197.  
  198.         NULL, NULL, SEPARATOR, "", Test_TB,
  199.         NULL, NULL, SEPARATOR, "", Test_TB,
  200.  
  201.         PXL_CUT,  ENABLED, CHECK_G, "Edit: Cut", Test_TB4, 
  202.         PXL_COPY ,  ENABLED, CHECK_G, "Edit: Copy", Test_TB5,
  203.         PXL_PASTE,  ENABLED, CHECK_G, "Edit: Paste", Test_TB6, 
  204.         PXL_DELETE,  ENABLED, CHECK_G, "Edit: Delete", Test_TB7, 
  205.         PXL_REPLACE, ENABLED,CHECK_G,"Edit: Replace",Test_TB8,
  206.         PXL_REDO,  ENABLED, STD, "Redo", Test_TB9, 
  207.         PXL_UNDO,  ENABLED, STD, "Undo", Test_TB9, 
  208.         PXL_PRINT,  ENABLED, STD, "Print", Test_TB10, 
  209.  
  210.         NULL, NULL, SEPARATOR, "", Test_TB,
  211.  
  212.         PXL_FIND,  ENABLED, STD, "Find", Test_TB8, 
  213.         PXL_PROP, ENABLED, STD,"Properties", Test_TB8,
  214.         PXL_PPREV,  ENABLED, STD, "Print Preview", Test_TB11, 
  215.         PXL_SHOHLP,  ENABLED, STD, "Show Help", Test_TB12) 
  216.  
  217.     Goto Wait_for_Input
  218.  
  219. Make_VSmall_Toolbar:
  220.     UseBackground(TRANSPARENT, 0,128,0)
  221.     DrawBackground
  222.  
  223.     Toolbar(    RAISED,
  224.     VIEW_SMALL,
  225.         NULL, NULL, SEPARATOR, "", Test_TB,
  226.         LGICONS,  ENABLED, STD, "View Large Icons", Test_TB13,
  227.         SMICONS,  ENABLED, STD, "View Small Icons", Test_TB14,
  228.         PARENTFOLDER,  ENABLED, STD, "Parent Folder", Test_TB15,
  229.         NEWFOLDER,  ENABLED, STD, "New Folder", Test_TB16,
  230.  
  231.         NULL, NULL, SEPARATOR, "", Test_TB,
  232.         NULL, NULL, SEPARATOR, "", Test_TB,
  233.  
  234.         LIST,  ENABLED, STD, "View List", Test_TB13,
  235.         DETAILS,  ENABLED, STD, "View Details", Test_TB13,
  236.  
  237.         NULL, NULL, SEPARATOR, "", Test_TB,
  238.  
  239.         SORTBYNM,  ENABLED, STD, "Sort by Name", Test_TB13,
  240.         SORTBYSZ,  ENABLED, STD, "Sort by Size", Test_TB13,
  241.         SORTBYDT,  ENABLED, STD, "Sort by Date", Test_TB13,
  242.         SORTBYTYP,  ENABLED, STD, "Sort by Type", Test_TB13,
  243.  
  244.         NULL, NULL, SEPARATOR, "", Test_TB,
  245.         
  246.         NETCNCT,  ENABLED, STD, "Network Connect", Test_TB13,
  247.         NETDSCNCT,  ENABLED, STD, "Network DisConnect", Test_TB13)
  248.  
  249.     Goto Wait_for_Input
  250.  
  251.  
  252. Make_VLarge_Toolbar:
  253.     UseBackground(TRANSPARENT, 0,128,0)
  254.     DrawBackground
  255.  
  256.     Toolbar(    RAISED,
  257.     VIEW_LARGE,
  258.         NULL, NULL, SEPARATOR, "", Test_TB,
  259.         LGICONS,  ENABLED, STD, "View Large Icons", Test_TB13,
  260.         SMICONS,  ENABLED, STD, "View Small Icons", Test_TB14,
  261.         PARENTFOLDER,  ENABLED, STD, "Parent Folder", Test_TB15,
  262.         NEWFOLDER,  ENABLED, STD, "New Folder", Test_TB16,
  263.  
  264.         NULL, NULL, SEPARATOR, "", Test_TB,
  265.         NULL, NULL, SEPARATOR, "", Test_TB,
  266.  
  267.         LIST,  ENABLED, STD, "View List", Test_TB13,
  268.         DETAILS,  ENABLED, STD, "View Details", Test_TB13,
  269.  
  270.         NULL, NULL, SEPARATOR, "", Test_TB,
  271.  
  272.         SORTBYNM,  ENABLED, STD, "Sort by Name", Test_TB13,
  273.         SORTBYSZ,  ENABLED, STD, "Sort by Size", Test_TB13,
  274.         SORTBYDT,  ENABLED, STD, "Sort by Date", Test_TB13,
  275.         SORTBYTYP,  ENABLED, STD, "Sort by Type", Test_TB13,
  276.  
  277.         NULL, NULL, SEPARATOR, "", Test_TB,
  278.         
  279.         NETCNCT,  ENABLED, STD, "Network Connect", Test_TB13,
  280.         NETDSCNCT,  ENABLED, STD, "Network DisConnect", Test_TB13)
  281.     Goto Wait_for_Input
  282.  
  283. Make_HSmall_Toolbar:
  284.     UseBackground(TRANSPARENT, 0,128,0)
  285.     DrawBackground
  286.  
  287.     Toolbar(    RAISED,
  288.     HIST_SMALL,
  289.         NULL, NULL, SEPARATOR, "", Test_TB,
  290.         BACK,  ENABLED, STD, "Back", Test_TB13,
  291.         FORWARD,  ENABLED, STD, "Forward", Test_TB13,
  292.         FAVORITES,  ENABLED, STD, "Favorites", Test_TB13,
  293.         ADDTOFAVORITES,  ENABLED, STD, "Add to Favorites", Test_TB13,
  294.         VIEWTREE,  ENABLED, STD, "View Tree", Test_TB13)
  295.  
  296.     Goto Wait_for_Input
  297.  
  298. Make_HLarge_Toolbar:
  299.     UseBackground(TRANSPARENT, 0,128,0)
  300.     DrawBackground
  301.  
  302.     Toolbar(    RAISED,
  303.     HIST_LARGE,
  304.         NULL, NULL, SEPARATOR, "", Test_TB,
  305.         BACK,  ENABLED, STD, "Back", Test_TB13,
  306.         FORWARD,  ENABLED, STD, "Forward", Test_TB13,
  307.         FAVORITES,  ENABLED, STD, "Favorites", Test_TB13,
  308.         ADDTOFAVORITES,  ENABLED, STD, "Add to Favorites", Test_TB13,
  309.         VIEWTREE,  ENABLED, STD, "View Tree", Test_TB13)
  310.  
  311.     Goto Wait_for_Input
  312.  
  313. Make_MSmall_Toolbar:
  314.     UseBackground(TRANSPARENT, 0,128,0)
  315.     DrawBackground
  316.  
  317.     Toolbar(    RAISED,
  318.     PXL_SMALL,
  319.         NULL, NULL, SEPARATOR, "", Test_TB,
  320.  
  321.         PXL_NEW, ENABLED, STD, "FileNew", Test_TB1,
  322.         PXL_OPEN, ENABLED, STD, "FileOpen", Test_TB2,
  323.         PXL_SAVE, ENABLED, STD, "FileSave", Test_TB3,
  324.         NULL, NULL, SEPARATOR, "", Test_TB,
  325.         PXL_LGICONS,  ENABLED, STD, "View Large Icons", Test_TB13,
  326.         PXL_SMICONS,  ENABLED, STD, "View Small Icons", Test_TB14,
  327.         PXL_PARENTFOLDER,  ENABLED, STD, "Parent Folder", Test_TB15,
  328.         PXL_NEWFOLDER,  ENABLED, STD, "New Folder", Test_TB16,
  329.  
  330.         NULL, NULL, SEPARATOR, "", Test_TB,
  331.         PXL_BACK,  ENABLED, STD, "Back", Test_TB13,
  332.         PXL_FORWARD,  ENABLED, STD, "Forward", Test_TB13,
  333.         PXL_FAVORITES,  ENABLED, STD, "Favorites", Test_TB13,
  334.         PXL_ADDTOFAVORITES,  ENABLED, STD, "Add to Favorites", Test_TB13,
  335.         PXL_VIEWTREE,  ENABLED, STD, "View Tree", Test_TB13,
  336.  
  337.         NULL, NULL, SEPARATOR, "", Test_TB,
  338.         ANNOT,  ENABLED, STD, "Annotation", Test_TB1,
  339.         SQSELECT,  ENABLED, STD, "Select", Test_TB1,
  340.         POLYSELECT,  ENABLED, STD, "PolySelect", Test_TB1,
  341.         ERASE,  ENABLED, STD, "Erase", Test_TB1,
  342.         OPENIMAGE,  ENABLED, STD, "Open Image", Test_TB1,
  343.         HISTOGRAM,  ENABLED, STD, "Histogram", Test_TB1)
  344.  
  345.  
  346.     Goto Wait_for_Input
  347.  
  348.  
  349. Make_MLarge_Toolbar:
  350.     UseBackground(TRANSPARENT, 0,128,0)
  351.     DrawBackground
  352.  
  353.     Toolbar(    RAISED,
  354.     PXL_LARGE,
  355.         PXL_NEW, ENABLED, STD, "FileNew", Test_TB1,
  356.         PXL_OPEN, ENABLED, STD, "FileOpen", Test_TB2,
  357.         PXL_SAVE, ENABLED, STD, "FileSave", Test_TB3,
  358.  
  359.         NULL, NULL, SEPARATOR, "", Test_TB,
  360.         PXL_LGICONS,  ENABLED, STD, "View Large Icons", Test_TB13,
  361.         PXL_SMICONS,  ENABLED, STD, "View Small Icons", Test_TB14,
  362.         PXL_PARENTFOLDER,  ENABLED, STD, "Parent Folder", Test_TB15,
  363.         PXL_NEWFOLDER,  ENABLED, STD, "New Folder", Test_TB16,
  364.  
  365.         NULL, NULL, SEPARATOR, "", Test_TB,
  366.         PXL_BACK,  ENABLED, STD, "Back", Test_TB13,
  367.         PXL_FORWARD,  ENABLED, STD, "Forward", Test_TB13,
  368.         PXL_FAVORITES,  ENABLED, STD, "Favorites", Test_TB13,
  369.         PXL_ADDTOFAVORITES,  ENABLED, STD, "Add to Favorites", Test_TB13,
  370.         PXL_VIEWTREE,  ENABLED, STD, "View Tree", Test_TB13,
  371.  
  372.         NULL, NULL, SEPARATOR, "", Test_TB,
  373.         ANNOT,  ENABLED, STD, "Annotation", Test_TB1,
  374.         SQSELECT,  ENABLED, STD, "Select", Test_TB1,
  375.         POLYSELECT,  ENABLED, STD, "PolySelect", Test_TB1,
  376.         ERASE,  ENABLED, STD, "Erase", Test_TB1,
  377.         OPENIMAGE,  ENABLED, STD, "Open Image", Test_TB1,
  378.         HISTOGRAM,  ENABLED, STD, "Histogram", Test_TB1)
  379.  
  380.     Goto Wait_for_Input
  381.  
  382. Make_SPiXCL_Toolbar:
  383.     UseBackground(TRANSPARENT, 0,128,0)
  384.     DrawBackground
  385.  
  386.     Toolbar(    RAISED, 
  387.     PXL_SMALL, 
  388.         ANNOT,  ENABLED, STD, "Annotation", Test_TB1,
  389.         SQSELECT,  ENABLED, STD, "Select", Test_TB1,
  390.         POLYSELECT,  ENABLED, STD, "PolySelect", Test_TB1,
  391.         ERASE,  ENABLED, STD, "Erase", Test_TB1,
  392.         OPENIMAGE,  ENABLED, STD, "Open Image", Test_TB1,
  393.         HISTOGRAM,  ENABLED, STD, "Histogram", Test_TB1,
  394.         MIRROR,  ENABLED, STD, "Image Mirror", Test_TB1,
  395.         FLIP,  ENABLED, STD, "Image Flip", Test_TB1,
  396.         ROTATE,  ENABLED, STD, "Image Rotate", Test_TB1,
  397.         SHOWRGB,  ENABLED, STD, "Show RGB", Test_TB1,
  398.         PICKRGB,  ENABLED, STD, "Pick RGB", Test_TB1,
  399.         CLASSIFY,  ENABLED, STD, "Fast Classify", Test_TB1,
  400.         NORMALIZE,  ENABLED, STD, "Normalize Image", Test_TB1,
  401.         EQUALIZE,  ENABLED, STD, "Equalize Image", Test_TB1,
  402.         NEGATIVE,  ENABLED, STD, "Negative Image", Test_TB1,
  403.         GAMMACRCT,  ENABLED, STD, "Gamma Correct", Test_TB1,
  404.         IMAGEINFO,  ENABLED, STD, "ImageInfo", Test_TB1,
  405.         FINGER,  ENABLED, STD, "Finger", Test_TB1,
  406.         HAND,  ENABLED, STD, "Hand", Test_TB1,
  407.         FLOOD,  ENABLED, STD, "Flood", Test_TB1,
  408.         SPRAY,  ENABLED, STD, "Spray", Test_TB1,
  409.         ZOOMUP,  ENABLED, STD, "Positive Zoom", Test_TB1,
  410.         ZOOMDN,  ENABLED, STD, "Negative Zoom", Test_TB1,
  411.         BRUSH,  ENABLED, STD, "Brush", Test_TB1,
  412.         PEN,  ENABLED, STD, "Line", Test_TB1)
  413.  
  414.     Goto Wait_for_Input
  415.  
  416. Make_LPiXCL_Toolbar:
  417.     UseBackground(TRANSPARENT, 0,128,0)
  418.     DrawBackground
  419.  
  420.     Toolbar(    RAISED, 
  421.     PXL_LARGE, 
  422.         ANNOT,  ENABLED, STD, "Annotation", Test_TB1,
  423.         SQSELECT,  ENABLED, STD, "Select", Test_TB1,
  424.         POLYSELECT,  ENABLED, STD, "PolySelect", Test_TB1,
  425.         ERASE,  ENABLED, STD, "Erase", Test_TB1,
  426.         OPENIMAGE,  ENABLED, STD, "Open Image", Test_TB1,
  427.         HISTOGRAM,  ENABLED, STD, "Histogram", Test_TB1,
  428.         MIRROR,  ENABLED, STD, "Image Mirror", Test_TB1,
  429.         FLIP,  ENABLED, STD, "Image Flip", Test_TB1,
  430.         ROTATE,  ENABLED, STD, "Image Rotate", Test_TB1,
  431.         SHOWRGB,  ENABLED, STD, "Show RGB", Test_TB1,
  432.         PICKRGB,  ENABLED, STD, "Pick RGB", Test_TB1,
  433.         CLASSIFY,  ENABLED, STD, "Fast Classify", Test_TB1,
  434.         NORMALIZE,  ENABLED, STD, "Normalize Image", Test_TB1,
  435.         EQUALIZE,  ENABLED, STD, "Equalize Image", Test_TB1,
  436.         NEGATIVE,  ENABLED, STD, "Negative Image", Test_TB1,
  437.         GAMMACRCT,  ENABLED, STD, "Gamma Correct", Test_TB1,
  438.         IMAGEINFO,  ENABLED, STD, "ImageInfo", Test_TB1,
  439.         FINGER,  ENABLED, STD, "Finger", Test_TB1,
  440.         HAND,  ENABLED, STD, "Hand", Test_TB1,
  441.         FLOOD,  ENABLED, STD, "Flood", Test_TB1,
  442.         SPRAY,  ENABLED, STD, "Spray", Test_TB1,
  443.         ZOOMUP,  ENABLED, STD, "Positive Zoom", Test_TB1,
  444.         ZOOMDN,  ENABLED, STD, "Negative Zoom", Test_TB1,
  445.         BRUSH,  ENABLED, STD, "Brush", Test_TB1,
  446.         PEN,  ENABLED, STD, "Line", Test_TB1)
  447.  
  448.     Goto Wait_for_Input
  449.  
  450.  
  451.  
  452. BtnStatus:
  453.     DrawBackground
  454.     UseFont("Arial",11,0,NOBOLD,NOITALIC, NOUNDERLINE,255,255,255)
  455.  
  456.     ChangeToolBarBtn("", 2,DISABLED,Res)
  457.     If Res = 0 Then DrawText(10,130,"ChangeToolBarBtn 1 failed")
  458.     If Res = 1 Then DrawText(10,130,"DISABLED state")
  459.     WaitInput(1400)  
  460.  
  461.     ChangeToolBarBtn("", 2,CHECKED,Res)
  462.     If Res = 0 Then DrawText(10,150,"ChangeToolBarBtn 2  failed")
  463.     If Res = 1 Then DrawText(10,150,"CHECKED state")
  464.     WaitInput(1400)  
  465.  
  466.     ChangeToolBarBtn("", 2,PRESSED,Res)
  467.     If Res = 0 Then DrawText(10,170,"ChangeToolBarBtn 3  failed")
  468.     If Res = 1 Then DrawText(10,170,"PRESSED state")
  469.     WaitInput(1400)  
  470.  
  471.     ChangeToolBarBtn("", 2,ENABLED,Res)
  472.     If Res = 0 Then DrawText(10,190,"ChangeToolBarBtn 4 failed")
  473.     If Res = 1 Then DrawText(10,190,"ENABLED state")
  474.     
  475.     UseFont("Arial",7,0,NOBOLD,NOITALIC, NOUNDERLINE,0,0,0)
  476.     PXLCmds(Fixed, Variable)
  477.     If Major = 4
  478.         DrawText(10,220,"PiXCL 4.4 Fixed and Variable Keyword Counts")
  479.     Else
  480.         DrawText(10,220,"PiXCL 5.0 Fixed and Variable Keyword Counts")
  481.     Endif
  482.     DrawNumber(10,240,Fixed)
  483.     DrawNumber(10,260,Variable)
  484.     Goto Wait_for_Input
  485.  
  486. TWBtnStatus2:
  487.     ChangeToolBarBtn("PiXCL 4.4",7,DISABLED,Res)  WaitInput(800)
  488.     ChangeToolBarBtn("PiXCL 4.4",6,DISABLED,Res)  WaitInput(800)
  489.     ChangeToolBarBtn("PiXCL 4.4",5,DISABLED,Res)  WaitInput(800)
  490.     ChangeToolBarBtn("PiXCL 4.4",4,DISABLED,Res)  WaitInput(800)
  491.     ChangeToolBarBtn("PiXCL 4.4",3,DISABLED,Res)  WaitInput(800)
  492.  
  493.     ChangeToolBarBtn("PiXCL 4.4",7,ENABLED,Res)  WaitInput(800)
  494.     ChangeToolBarBtn("PiXCL 4.4",6,ENABLED,Res)  WaitInput(800)
  495.     ChangeToolBarBtn("PiXCL 4.4",5,ENABLED,Res)  WaitInput(800)
  496.     ChangeToolBarBtn("PiXCL 4.4",4,ENABLED,Res)  WaitInput(800)
  497.     ChangeToolBarBtn("PiXCL 4.4",3,ENABLED,Res)  
  498.  
  499.     Goto Wait_for_Input
  500.  
  501. TWBtnStatus:
  502.     DrawBackground
  503.     UseFont("Arial",11,0,NOBOLD,NOITALIC, NOUNDERLINE,255,255,255)
  504.     ChangeToolBarBtn("PiXCL 4.4",2,DISABLED,Res) 
  505.     ChangeToolBarBtn("P History",2,DISABLED,Res) 
  506.     ChangeToolBarBtn("View Btns",2,DISABLED,Res) 
  507.     If Res = 0 Then DrawText(10,130,"ChangeToolWindowBtn 2 failed") 
  508.     If Res = 1 Then DrawText(10,130,"DISABLED state") 
  509.     WaitInput(1400)   
  510.  
  511.     ChangeToolBarBtn("PiXCL 4.4",2,CHECKED,Res) 
  512.     ChangeToolBarBtn("P History",2,CHECKED,Res) 
  513.     ChangeToolBarBtn("View Btns",2,CHECKED,Res) 
  514.     If Res = 0 Then DrawText(10,150,"ChangeToolWindowrBtn 2  failed")
  515.     If Res = 1 Then DrawText(10,150,"CHECKED state")
  516.     WaitInput(1400)  
  517.  
  518.     ChangeToolBarBtn("PiXCL 4.4",2,PRESSED,Res)
  519.     ChangeToolBarBtn("P History",2,PRESSED,Res)
  520.     ChangeToolBarBtn("View Btns",2,PRESSED,Res)
  521.     If Res = 0 Then DrawText(10,170,"ChangeToolWindowrBtn 2  failed")
  522.     If Res = 1 Then DrawText(10,170,"PRESSED state")
  523.     WaitInput(1400)  
  524.  
  525.     ChangeToolBarBtn("PiXCL 4.4",2,ENABLED,Res) 
  526.     ChangeToolBarBtn("P History",2,ENABLED,Res) 
  527.     ChangeToolBarBtn("View Btns",2,ENABLED,Res) 
  528.     If Res = 0 Then DrawText(10,190,"ChangeToolWindowBtn 2 failed") 
  529.     If Res = 1 Then DrawText(10,190,"ENABLED state")
  530.  
  531.     Goto Wait_for_Input
  532.  
  533.  
  534.  
  535.  
  536. Remove_Toolbar:
  537.     Toolbar()
  538.     DrawBackground
  539.     Goto Wait_for_Input
  540.  
  541. Test_TB:
  542.     Goto Wait_for_Input
  543.  
  544. Test_TW11:
  545.     UseBrush(SOLID,192,192,192)
  546.     UsePen(SOLID,1,0,0,0)
  547.     DrawRectangle(340,40,480,300)
  548.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_1 command.", LEFT)
  549.     Goto Wait_for_Input
  550.  
  551. Test_TW12:
  552.     UseBrush(SOLID,192,192,192)
  553.     UsePen(SOLID,1,0,0,0)
  554.     DrawRectangle(340,40,480,300)
  555.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_2 command.", LEFT)
  556.     Goto Wait_for_Input
  557.  
  558. Test_TW13:
  559.     UseBrush(SOLID,192,192,192)
  560.     UsePen(SOLID,1,0,0,0)
  561.     DrawRectangle(340,40,480,300)
  562.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_3 command.", LEFT)
  563.     Goto Wait_for_Input
  564.  
  565. Test_TW14:
  566.     UseBrush(SOLID,192,192,192)
  567.     UsePen(SOLID,1,0,0,0)
  568.     DrawRectangle(340,40,480,300)
  569.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_4 command.", LEFT)
  570.     Goto Wait_for_Input
  571. Test_TW15:
  572.     UseBrush(SOLID,192,192,192)
  573.     UsePen(SOLID,1,0,0,0)
  574.     DrawRectangle(340,40,480,300)
  575.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_5 command.", LEFT)
  576.     Goto Wait_for_Input
  577.  
  578. Test_TW16:
  579.     UseBrush(SOLID,192,192,192)
  580.     UsePen(SOLID,1,0,0,0)
  581.     DrawRectangle(340,40,480,300)
  582.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_6 command.", LEFT)
  583.     Goto Wait_for_Input
  584.  
  585. Test_TW17:
  586.     UseBrush(SOLID,192,192,192)
  587.     UsePen(SOLID,1,0,0,0)
  588.     DrawRectangle(340,40,480,300)
  589.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_7 command.", LEFT)
  590.     Goto Wait_for_Input
  591.  
  592. Test_TW18:
  593.     UseBrush(SOLID,192,192,192)
  594.     UsePen(SOLID,1,0,0,0)
  595.     DrawRectangle(340,40,480,300)
  596.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_8 command.", LEFT)
  597.     Goto Wait_for_Input
  598.  
  599. Test_TW19:
  600.     UseBrush(SOLID,192,192,192)
  601.     UsePen(SOLID,1,0,0,0)
  602.     DrawRectangle(340,40,480,300)
  603.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_9 command.", LEFT)
  604.     Goto Wait_for_Input
  605.  
  606. Test_TW110:
  607.     UseBrush(SOLID,192,192,192)
  608.     UsePen(SOLID,1,0,0,0)
  609.     DrawRectangle(340,40,480,300)
  610.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_10 command.", LEFT)
  611.     Goto Wait_for_Input
  612. Test_TW111:
  613.     UseBrush(SOLID,192,192,192)
  614.     UsePen(SOLID,1,0,0,0)
  615.     DrawRectangle(340,40,480,300)
  616.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_11 command.", LEFT)
  617.     Goto Wait_for_Input
  618. Test_TW112:
  619.     UseBrush(SOLID,192,192,192)
  620.     UsePen(SOLID,1,0,0,0)
  621.     DrawRectangle(340,40,480,300)
  622.     DrawTextExt(350,50,480,300,"Testing ToolWindow 1_12 command.", LEFT)
  623.     Goto Wait_for_Input
  624.  
  625. Test_TW21:
  626.     UseBrush(SOLID,192,192,192)
  627.     UsePen(SOLID,1,0,0,0)
  628.     DrawRectangle(40,40,180,300)
  629.     DrawTextExt(50,50,180,300,"Testing ToolWindow 2_1 command.", LEFT)
  630.     Goto Wait_for_Input
  631. Test_TW22:
  632.     UseBrush(SOLID,192,192,192)
  633.     UsePen(SOLID,1,0,0,0)
  634.     DrawRectangle(40,40,180,300)
  635.     DrawTextExt(50,50,180,300,"Testing ToolWindow 2_2 command.", LEFT)
  636.     Goto Wait_for_Input
  637. Test_TW23:
  638.     UseBrush(SOLID,192,192,192)
  639.     UsePen(SOLID,1,0,0,0)
  640.     DrawRectangle(40,40,180,300)
  641.     DrawTextExt(50,50,180,300,"Testing ToolWindow 2_3 command.", LEFT)
  642.     Goto Wait_for_Input
  643. Test_TW24:
  644.     UseBrush(SOLID,192,192,192)
  645.     UsePen(SOLID,1,0,0,0)
  646.     DrawRectangle(40,40,180,300)
  647.     DrawTextExt(50,50,180,300,"Testing ToolWindow 2_4 command.", LEFT)
  648.     Goto Wait_for_Input
  649. Test_TW25:
  650.     UseBrush(SOLID,192,192,192)
  651.     UsePen(SOLID,1,0,0,0)
  652.     DrawRectangle(340,40,480,300)
  653.     DrawTextExt(350,50,480,300,"Testing ToolWindow 2_5 command.", LEFT)
  654.     Goto Wait_for_Input
  655.  
  656.  
  657.  
  658.  
  659. Test_TB1:
  660.     UseBrush(SOLID,192,192,192)
  661.     UsePen(SOLID,1,0,0,0)
  662.     DrawRectangle(340,40,480,300)
  663.     DrawTextExt(350,50,480,300,"Testing Toolbar 1 command.", LEFT)
  664.     Goto Wait_for_Input
  665.  
  666. Test_TB2:
  667.     UseBrush(SOLID,192,192,192)
  668.     UsePen(SOLID,1,0,0,0)
  669.     DrawRectangle(340,40,480,300)
  670.     DrawTextExt(350,50,480,300,"Testing Toolbar 2 command.", LEFT)
  671.     Goto Wait_for_Input
  672.  
  673. Test_TB3:
  674.     UseBrush(SOLID,192,192,192)
  675.     UsePen(SOLID,1,0,0,0)
  676.     DrawRectangle(340,40,480,300)
  677.     DrawTextExt(350,50,480,300,"Testing Toolbar 3 command.", LEFT)
  678.     Goto Wait_for_Input
  679.  
  680. Test_TB4:
  681.     UseBrush(SOLID,192,192,192)
  682.     UsePen(SOLID,1,0,0,0)
  683.     DrawRectangle(340,40,480,300)
  684.     DrawTextExt(350,50,480,300,"Testing Toolbar 4 command.", LEFT)
  685.     Goto Wait_for_Input
  686.  
  687. Test_TB5:
  688.     UseBrush(SOLID,192,192,192)
  689.     UsePen(SOLID,1,0,0,0)
  690.     DrawRectangle(340,40,480,300)
  691.     DrawTextExt(350,50,480,300,"Testing Toolbar 5 command.", LEFT)
  692.     Goto Wait_for_Input
  693.  
  694. Test_TB6:
  695.     UseBrush(SOLID,192,192,192)
  696.     UsePen(SOLID,1,0,0,0)
  697.     DrawRectangle(340,40,480,300)
  698.     DrawTextExt(350,50,480,300,"Testing Toolbar 6 command.", LEFT)
  699.     Goto Wait_for_Input
  700.  
  701. Test_TB7:
  702. Test_TB8:
  703. Test_TB9:
  704. Test_TB10:
  705. Test_TB11:
  706. Test_TB12:
  707. Test_TB13:
  708. Test_TB14:
  709. Test_TB15:
  710. Test_TB16:
  711.     UseBrush(SOLID,192,192,192)
  712.     UsePen(SOLID,1,0,0,0)
  713.     DrawRectangle(340,40,480,300)
  714.     DrawTextExt(350,50,480,300,"Testing Toolbar 7-16 command.", LEFT)
  715.     Goto Wait_for_Input
  716.  
  717. MouseInfo:
  718.     DrawBackground
  719.     StatusWindow(ENABLE,BOTTOM,2,200,400,-1,0)
  720.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  721.     ReportMouse(cx1,cy1,cx2,cy2, 1,1,  1,1,  1,1, NORGB,CHILD,40,45)
  722.     Goto Wait_for_Input
  723.  
  724. MouseInfoRGB:
  725.     StatusWindow(ENABLE,BOTTOM,3,200,400,-1,0)
  726.     GoSub MakeTimeString
  727.  
  728.     UseBrush(NULL,0,0,0)
  729.     UsePen(DASH,2,0,0,0)
  730.     DrawRectangle(40,40,299,299)
  731.     DrawText(60,60,"Report Mouse Active Region")
  732.     ReportMouse(40,40,299,299, -40,298, 1,-1, 2,2, RGB,CHILD,40,45)
  733.     Goto Wait_for_Input
  734.  
  735. MakeTimeString: {subroutine}
  736.     TimeToASCII(LOCAL, WDDDMYYYY, TimeString$)
  737.     If Major = 4
  738.         GetLocalTime(n,n,n,n,Hour,Minutes)
  739.     Else
  740.         GetLocalTime(n,n,n,n,Hour,Minutes,Seconds)
  741.     Endif
  742.     Str(Hour,Hour$)   Str(Minutes,Min$)
  743.     TimeDateString$ = Hour$ + ":"
  744.     TimeDateString$ = TimeDateString$ +  Min$
  745.     TimeDateString$ = TimeDateString$ +  "  "
  746.     TimeDateString$ = TimeDateString$ + TimeString$
  747.     DrawStatusWinText(2,TimeDateString$)
  748.     Return
  749.  
  750.  
  751.  
  752. MouseInfoEnd:
  753.     StatusWindow(DISABLE,BOTTOM,2,200,400,-1,0)
  754.     ReportMouse(cx1,cy1,cx2,cy2, 1,1, 1,1, 1,1, DISABLE,CHILD,40,45)
  755.     Goto Wait_for_Input
  756.  
  757. Test1:
  758.     SetPopupMenu("P Item #&1",Item_1,
  759.              SEPARATOR,
  760.              "P Item #&2",Item_2,
  761.              SEPARATOR,
  762.              "P Item #&3",Item_3,
  763.              "&Restore",Item_4,
  764.              ENDPOPUP)
  765.     Goto Wait_for_Input
  766.  
  767. Test2:
  768.     SetPopupMenu()
  769.     Goto Wait_for_Input
  770.  
  771. Item_1:
  772.     PasswordBox("PasswordBox title#1","Enter your password","Btn #1","Btn#2",Btn,Password1$)
  773.     Goto Wait_for_Input
  774. Item_2:
  775.     Password2$ = "blahblahblah"
  776.     PasswordBox("PasswordBox title#2","Verify a password 1",
  777.         "&Pass","&Fail",Btn,Password2$)
  778.     Goto Wait_for_Input
  779. Item_3:
  780.     PasswordBox("PasswordBox title#3","Verify a password 2",
  781.         "","",Btn,Password3$)
  782.     {DrawNumber(10,10,Btn)  DrawText(25,10,PassWord3$) }
  783.     Goto Wait_for_Input
  784.  
  785. Item_4:
  786.     WinShow(Title$,RESTORE,Res)
  787.     Goto Wait_for_Input
  788.  
  789.  
  790. DrawBkg:
  791.     Redraw
  792.     Goto Wait_for_Input
  793.  
  794.  
  795. Leave:
  796.     End  {"Quit" keyword  is also supported}
  797.  
  798. Concept:
  799.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  800.     DrawBackground
  801.     UseFont("Arial",13,29,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  802.     DrawText(16,16,"Toolbars and ToolWindows")
  803.     UseFont("Arial",13,29,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
  804.     DrawText(15,15,"Toolbars and ToolWindows")
  805.  
  806.     UseFont("Arial",7,0,BOLD,NOITALIC,NOUNDERLINE,0,0,0)
  807.     cx1 += 10  cx2 -= 10    cy1 += 70
  808.     DrawTextExt(cx1,cy1,cx2,cy2,
  809. "PiXCL 4.4 and later support custom toolbars and floating toolwindows, both with tooltip support. 
  810.  
  811. You can have small or large buttons, in the standard 3D style or the Internet Explorer flat stye. There are the standard, view and history buttons built into Windows, plus a large selection of buttons built into PiXCL directly.
  812.  
  813. See the menu items above for examples of these styles.",
  814.     LEFT)
  815.  
  816.     Return
  817.